Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ili binaries distribution #138

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ponceta
Copy link
Member

@ponceta ponceta commented Apr 26, 2024

Upgrade ili2pg and ilivalidator

Upgrade ili2pg and ilivalidator
@ponceta ponceta added the ili2pg issues that require upstream ili2pg changes label Apr 26, 2024
@sjib
Copy link
Contributor

sjib commented Jun 3, 2024

Model VSA_KEK_2019_LV95 requires column T_basket Traceback (most recent call last): File "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/utils/various.py", line 50, in exec_ proc = subprocess.run( File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '"java" -jar "/home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/bin/ili2pg-5.1.0-bindist/ili2pg-5.1.0.jar" --schemaimport --dbhost "127.0.0.1" --dbport "5432" --dbusr "postgres" --dbpwd "postgres" --dbdatabase "qgep_prod" --dbschema pg2ili_abwasser --setupPgExt --createGeomIdx --createFk --createFkIdx --createTidCol --importTid --noSmartMapping --defaultSrsCode 2056 --log "/tmp/qgepqwat2ili/240426132109.ilicreate.log" --nameLang de /home/runner/work/qgepqwat2ili/qgepqwat2ili/qgepqwat2ili/ili/VSA_KEK_2019_2_d_LV95-20210120.ili' returned non-zero exit status 1.

Looks like we have to adapt KEK Import with that change with column T_basket

@sjib
Copy link
Contributor

sjib commented Jun 3, 2024

@ponceta I just tested this pullrequest with the new binaries by copying them manually. It does not change anything but still uses the binaries of the ModelBaker version installed. If I do not have ModelBaker installed there is an Error that it is not installed.

A (hacky) work around is to manually also change the ili2db library version in the QGISModelBaker directory of the QGIS profile used - when I change the ili2db files in the QGIS\QGIS3\profiles\default\python\plugins\QgisModelBaker\libili2db\bin\ili2pg-4.5.0 folder (keeping the name of the folder and renaming ili2pg-5.1.0 to ili2pg-4.5.0 ) it seems to work (thanks @DflGruBoe for helping me with this).

I have QGISModelBaker 6.5.2 installed- the last release before it changes to the new architecture with the separate modelbaker library

So we should:

  • Find out why we still have the need of a ModelBaker installation - and remove it (where in the plugin code do we have that dependency?)
  • Make sure the new ili2db binaries in the qgepplugin folder are used instead
  • adapt KEK Import / Export with that change with column T_basket

@sjib
Copy link
Contributor

sjib commented Jun 3, 2024

Find out why we still have the need of a ModelBaker installation
def configure_from_modelbaker(iface):
See

def configure_from_modelbaker(iface):

Maybe adjusting this to v6.5.2
REQUIRED_VERSION = "v6.4.0" # TODO : update once https://github.com/opengisch/QgisModelBaker/pull/473 is released
would already help.

@sjib
Copy link
Contributor

sjib commented Jun 3, 2024

Basket handling in ModelBaker see https://opengisch.github.io/QgisModelBaker/background_info/basket_handling/

@sjib
Copy link
Contributor

sjib commented Aug 2, 2024

Here is the adapted ModelBaker6.5.2modqgep.zip that has ili2pg 5.1.0 instead of 4.5.0 (as the SCRAM bug was fixed there)

20240802_modelbaker_with_newer_ili2pg_510_instead_450

@sjib
Copy link
Contributor

sjib commented Aug 2, 2024

@sjib
Copy link
Contributor

sjib commented Aug 2, 2024

Works with SIA405 Abwasser and VSA-DSS, but creates new problem with VSA-KEK: Model VSA_KEK_2019_LV95 requires column T_basket

2024-08-02T18:19:36     WARNING    Traceback (most recent call last):
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\utils\various.py", line 50, in exec_
              proc = subprocess.run(
              ^^^^^^^^^^^^^^^
              File "C:\PROGRA~1\QGIS 3.34.8\apps\Python312\Lib\subprocess.py", line 571, in run
              raise CalledProcessError(retcode, process.args,
             subprocess.CalledProcessError: Command '"C:\Program Files\Eclipse Foundation\jre-11.0.12.7-hotspot\bin\java" -jar "C:\Users\Stefan\AppData\Roaming\QGIS\QGIS3\profiles\testplugin163dm162\python\plugins\QgisModelBaker\libili2db\bin\ili2pg-4.5.0\ili2pg-4.5.0.jar" --schemaimport --dbhost "localhost" --dbport "5433" --dbusr "postgres" --dbpwd "sjib" --dbdatabase "qgep_testplugin163dm162" --dbschema pg2ili_abwasser --setupPgExt --createGeomIdx --createFk --createFkIdx --createTidCol --importTid --noSmartMapping --defaultSrsCode 2056 --log "C:/Daten/QGEP/testplugin163dm162/20240802_qgep-export.xtf.240802181933.ili2pg-schemaimport.log" --nameLang de C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\ili\VSA_KEK_2019_2_d_LV95-20210120.ili' returned non-zero exit status 1.
             
             During handling of the above exception, another exception occurred:
             
             Traceback (most recent call last):
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\gui\__init__.py", line 499, in action_do_export
              create_ili_schema(
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\utils\ili2db.py", line 184, in create_ili_schema
              exec_(
              File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testplugin163dm162/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\utils\various.py", line 60, in exec_
              raise CmdException(f"Command errored ! See logs for more info.")
             qgepplugin.qgepqwat2ili.qgepqwat2ili.utils.various.CmdException: Command errored ! See logs for more info.

@sjib
Copy link
Contributor

sjib commented Oct 15, 2024

Does https://github.com/QGEP/qgepqwat2ili/milestone/6 solves this also? @ponceta please coordinate!

@sjib sjib added this to the Datamodel 1.6.3 Plugin 1.6.4 milestone Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ili2pg issues that require upstream ili2pg changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants